home *** CD-ROM | disk | FTP | other *** search
- Path: news.umbc.edu!not-for-mail
- From: schlein@umbc.edu (Jonas J. Schlein)
- Newsgroups: comp.lang.c
- Subject: Re: Help referencing an array of strings
- Date: 15 Mar 1996 19:57:59 -0500
- Organization: University of Maryland Baltimore County
- Message-ID: <4id3mn$677@umbc9.umbc.edu>
- References: <313C7F02.5D54@interramp.com> <4i5c74$80e@coranto.ucs.mun.ca>
- NNTP-Posting-Host: umbc9.umbc.edu
- NNTP-Posting-User: schlein
-
- James A. Clifton <jclifton@interramp.com> wrote:
- >> typedef struct ss {
- >> /* some other data */
- >> char sa[N][M];
- >> } ss;
- >>
- >> ss s;
- >>
- >> Now how do I reference the Nth string???
-
- Steve Austin <saustin@terra.nlnet.nf.ca> wrote:
- > s.sa[N]
-
- Do I detect a former (current) Pascal programmer ;-). Surely you mean
- s.sa[N-1] since C accesses arrays from 0..n-1.
-
- This has been brought to you by the sponsors Segmentation Fault and Core Dump.
- --
- "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
-
- Jonas J. Schlein (schlein@gl.umbc.edu)
-